import Vue from 'vue'
import Vuex from 'vuex'

import gMonitor from './modules/globalMonitoring'
import moduleFaultAlertChart from './modules/faultAlert'
import healthManage_trainScore from "./modules/healthManage_trainScore";
import docManage from "./modules/docManage";

Vue.use(Vuex)

export default new Vuex.Store({

    // state存储全局数据
    state: {

    },
    // mutations用于变更store中的数据
    // 通过mutations集中监控数据变更，利于维护
    // 不要在mutations异步函数
    mutations: {

    },
    // 异步操作在actions中处理
    // action不能修改state，需通过mutation
    actions: {

    },
    modules: {
        gMonitor,
        moduleFaultAlertChart,
        healthManage_trainScore,
        docManage
    }
})
